//
//  UIButton+Category.swift
//  Super_WeiBo
//
//  Created by 梁超 on 16/3/27.
//  Copyright © 2016年 lc. All rights reserved.
//

import UIKit
extension UIButton
{
    class func createButton(imgName: String, title: String) -> UIButton{
        let b = UIButton()
        b.setImage(UIImage(named: imgName), forState: UIControlState.Normal)
        b.setTitle(title, forState: UIControlState.Normal)
        b.titleLabel?.font = UIFont.systemFontOfSize(10)
        b.setBackgroundImage(UIImage(named: "timeline_card_bottom_background"), forState: UIControlState.Normal)
        b.setTitleColor(UIColor.darkGrayColor(), forState: UIControlState.Normal)
        b.titleEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 0)
        return b
    }
}